home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / MacTechNotes / Platforms & Tools / Stand-Alone Code Folder / SampleINITƒ / SampleINIT.p < prev    next >
Encoding:
Text File  |  1990-04-19  |  494 b   |  31 lines  |  [TEXT/MPS ]

  1.  
  2. UNIT SampleINIT;    {stand-alone code is written as a UNIT}
  3.  
  4. INTERFACE
  5.     
  6.     USES
  7.         Types, Resources, Sound;
  8.  
  9.     {VAR
  10.         can’t define any globals…well, not yet anyway}
  11.  
  12.     PROCEDURE PlayZoo;
  13.  
  14. IMPLEMENTATION
  15.  
  16.     PROCEDURE PlayZoo;
  17.     VAR
  18.         numSnds, i : INTEGER;
  19.         theSnd : Handle;
  20.         playStatus : OSErr;
  21.     BEGIN
  22.         numSnds := CountResources('snd ');
  23.         FOR i := 1 TO numSnds DO BEGIN
  24.             theSnd := GetIndResource('snd ',i);
  25.             IF theSnd <> NIL THEN
  26.                 playStatus := SndPlay(NIL,theSnd,FALSE);
  27.             END;
  28.     END;
  29.  
  30. END.
  31.